Repository navigation
Reduce specializations - #1607
Merged
Merged
Conversation
Member
Author
|
I think this is in a good enough state for review. The one benchmark that is causing issues is: Notice it's really slow on M1 compared to M3 and also I observe faster in size_t than uint which is very unusual (!!). I suspect fixing the source of the slowness for that will cause the benchmark to look better in uint. |
angeloskath
force-pushed
the
reduce_specializations
branch
from
November 22, 2024 03:17
72baace to
6d5c120
Compare
angeloskath
approved these changes
Nov 22, 2024
angeloskath
left a comment
Member
There was a problem hiding this comment.
Looks great!
I 'll get to fixing the small rows in a separate PR. I will look into outputting strided matrices such that the reduction is always contiguous.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
uintandintuse the same kernels forsumandprodandandoruse the same kernel for all dtypes with the same sizeDIM=0specialization in the looper)DIM=1,2,5bool.Binary size
Old Metal library size = 77 Mb
New Metal library size = 76 Mb
Adding the same fusion of operations to the CPU dispatch saves about 0.7 MB from the CPU-only build:
Pre: 11.6 MB
Post: 10.9 MB
Benchmarks M1 MAX
Benchmarks M3 MAX
Full benchmarks below: